// 引入封装好的axios
import axios from '../../axios.js'


const orders = {
    // 获取
    getOrders: function (params) {
        // console.log(params);
        return axios({
            url: "/orders/getOrders",
            method: "get",
            params
        });
    },

    // 获取不同状态的订单
    getOtherOrders: function (params) {
        return axios({
            url: "/orders/getState",
            method: "get",
            params
        });
    },


    // 删除
    deleteOrders: function (data) {
        return axios({
            url: "/orders/whetherDelete",
            method: "post",
            data: {
                _id: data,
            }

        });
    },
}

export default orders